package com.qf.wangqing.sportsnews.adapter.headline;

import android.databinding.BindingAdapter;
import android.widget.ImageView;

import com.squareup.picasso.Picasso;

/**
 * Created by ShenHao on 2016/12/16.
 */
public class ImageLoad {
    @BindingAdapter(value={"loadUrl","asCircle"},requireAll = false)
    public static void loadImage(ImageView view, String url, boolean asCircle){


        Picasso.with(view.getContext()).load(url).into(view);
//        RequestCreator creator = null;
//        if (TextUtils.isEmpty(url)) {
//            creator = Picasso.with(view.getContext()).load(url);
//        }
//        if (asCircle){
//         creator.transform(new CircleTranslation());
//        }
//        creator.into(view);
    }
}
